package com.javaee.tallybook.until;

import java.util.HashMap;
import java.util.Map;

public class JsonResult {
    private Map<String,Object> dataMap=new HashMap<>();

    //针对code
    public void setCode(Object code){
        dataMap.put("code",code);
    }

    //针对msg
    public void setMsg(Object msg){
        dataMap.put("msg",msg);
    }

    //针对data
    public void setData(Object data){
        dataMap.put("data",data);
    }

    //针对count
//    定制键值，可拓展的键值方法
    public void put(String key,Object value){
        dataMap.put(key, value);
    }

    public Map<String,Object> getValues(){
        return dataMap;
    }
}
